<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="kr.cadis.clms.dao.PersonDao, kr.cadis.clms.model.Person" %>    
<%
	request.setCharacterEncoding("utf-8");

	String name = request.getParameter("name");

	Person person = new Person();
	person.setName(name);
	
	PersonDao personDao = new PersonDao();
	boolean bf = personDao.insert(person);
	
	if(bf == true) {
%>
<script type="text/javascript">
<!--
		window.location.href = "List.jsp";
//-->
</script>
<%		
	}
	else {		
%>
<script type="text/javascript">
<!--
		alert("사용자 정보를  DB 에 입력하는 데 오류가 있습니다.");
		window.location.href = "List.jsp";
//-->
</script>
<%		
	}
%>